set(LIBHELLO_SRC hello.cpp)
## 生成动态库
add_library(hello SHARED ${LIBHELLO_SRC}) 
## 动态库版本
SET_TARGET_PROPERTIES(hello PROPERTIES VERSION 1.2 SOVERSION 1)

## 生成静态库
ADD_LIBRARY(hello_static STATIC ${LIBHELLO_SRC})
SET_TARGET_PROPERTIES(hello_static PROPERTIES OUTPUT_NAME "hello")

## 安装共享库和头文件
INSTALL(TARGETS hello hello_static
        LIBRARY DESTINATION lib
        ARCHIVE DESTINATION lib
      )

INSTALL(FILES hello.h DESTINATION include/hello)